<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- AR.js 使用jsartoolkit5进行跟踪，但是可以使用three.js或A-Frame显示增强的内容 -->
    <!-- 
        1.带有标记跟踪追和基于位置 
        2.图像追踪和基于位置的 AR 
    -->
    <!-- <script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
    <script src="https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-threex-location-only.js"></script> -->
</head>

<body>
    <button>点我</button>


    <!-- <a-scene arjs embedded>
        <a-text value="hello" color="pink" rotation="-90 0 0 "></a-text>
        <a-marker-camera preset="hiro"></a-marker-camera>
    </a-scene> -->











    <script type="module">
        import { createToast } from "https://cdn.jsdelivr.net/npm/frontmessageplugin@1.0.5/messageLight.js?id=23"
        window.addEventListener('deviceorientation', function (event) {
            // z 垂直与 手机水平面
            let alpha = event.alpha;//绕z轴旋转的角度
            let beta = event.beta;//绕x轴旋转的角度
            
            let gamma = event.gamma;// 绕y轴旋转的角度
            createToast("info", ("begin:" + beta + gamma), 500)

        }, false);


// console.log(createToast)
// document.querySelector("button").addEventListener("click",()=>{
//             createToast("info","你1好",3000)
//         })
    </script>
</body>

</html>